package com.ncu.cloundeoffice.mapper;

import com.ncu.cloundeoffice.pojo.TDepartment;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
@Mapper
public interface TDepartmentMapper {


    /**
     * 查找所有的部门
     * @param parentId
     * @return
     */
    List<TDepartment> getAllTDepartments(Integer parentId);

    /**
     * 添加部门
     * @param tDepartment
     */
    void addDep(TDepartment tDepartment);

    /**
     * 删除部门
     * @param tDepartment
     */
    void deleteDep(TDepartment tDepartment);


    /**
     * 查询所以部门 无索引方式
     * @return
     */
    List<TDepartment> getAllTDepartment();
}
